﻿using System;
using System.IO;

public static class PathUtility
{
    public static string ChangeFileName(string path, string newName)
    {
        string directoryName = Path.GetDirectoryName(path);
        string extension = Path.GetExtension(path);
        return Path.Combine(directoryName, newName + extension);
    }
}

